package org.example.service.impl;

import org.example.mapper.PersonalmessageMapper;
import org.example.pojo.Personalmessage;
import org.example.service.PersonalmessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PersonalmessageServiceImpl implements PersonalmessageService {

    @Autowired
    private PersonalmessageMapper personalmessageMapper;

    @Override
    public void insertPersonalMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.insertPersonalMessage(userId, companyId, jobId, resumeId);
    }

    @Override
    public Personalmessage selectStatus(Integer userId, Integer jobId, Integer companyId) {
        return personalmessageMapper.selectStatus(userId, jobId, companyId);
    }

    @Override
    public List<Personalmessage> selectByUserId(Integer userId) {
        return personalmessageMapper.selectByUserId(userId);
    }

    @Override
    public void removeCollectJob(Integer userId, Integer jobId, Integer companyId) {
        personalmessageMapper.removeCollectJob(userId, jobId, companyId);
    }

    @Override
    public void removePostJob(Integer userId, Integer jobId, Integer companyId) {
        personalmessageMapper.removePostJob(userId, jobId, companyId);
    }

    @Override
    public void removeRecruitJob(Integer userId, Integer jobId, Integer companyId) {
        personalmessageMapper.removeRecruitJob(userId, jobId, companyId);
    }

    @Override
    public void updateInterview(Integer jobId, Integer companyId, Integer resumeId, Integer approve) {
        personalmessageMapper.updateInterview(jobId, companyId, resumeId, approve);
    }

    @Override
    public Personalmessage selectByUserIdAndJobIdAndCompanyId(Integer userId, Integer jobId, Integer companyId, Integer resumeId) {
        return personalmessageMapper.selectByUserIdAndJobIdAndCompanyId(userId, jobId, companyId, resumeId);
    }

    @Override
    public void insertPersonalFavorMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.insertPersonalFavorMessage(userId, companyId, jobId, resumeId);
    }

    @Override
    public void updatePersonalFavorMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.updatePersonalFavorMessage(userId, companyId, jobId, resumeId);
    }

    @Override
    public void updateFavorNullMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.updateFavorNullMessage(userId, companyId, jobId, resumeId);
    }

    @Override
    public void updatePostIdMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.updatePostIdMessage(userId, companyId, jobId, resumeId);
    }

    @Override
    public void insertPersonalApproveMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        personalmessageMapper.insertPersonalApproveMessage(userId, companyId, jobId, resumeId);
    }
}
